angular.module('faApp')
  .service('statisticsService', [ 'ajaxService',function (ajaxService) {

    this.statisticsFaRegisterByMonth = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_FA_REGISTER_BY_MONTH"), cfg || {});
    };
    this.statisticsFaUserRoleCount = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_FAUSER_ROLE_COUNT"), cfg || {});
    };
    this.statisticsRegisterAllCount = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_REGISTER_ALL_COUNT"), cfg || {});
    };
    this.statisticsOrderByMonth = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_ORDER_BY_MONTH"), cfg || {});
    };
    this.statisticsOrderUserPer = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_ORDER_USER_PER"), cfg || {});
    };
    this.statisticsOrderFauserRolePrpportion = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_ORDER_FAUSER_ROLE_PROPORTION"), cfg || {});
    };
    this.statisticsOrderFauserPrpportion = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_ORDER_FAUSER_PROPORTION"), cfg || {});
    };

    this.statisticsOrderUserTotal = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_ORDER_USER_TOTAL"), cfg || {});
    };

    this.statisticsCompanyTotal = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("STATISTICS_COMPANY_TOTAL"), cfg || {});
    };

    this.statisticsProductKeyWord = function (data) {
        return ajaxService.post(ajaxService.getApiUri("STATISTICS_PRODUCT_KEYWORD"),data || {});
    }
    this.statisticsProductKeyWordUser = function (data) {
        return ajaxService.post(ajaxService.getApiUri("STATISTICS_PRODUCT_KEYWORD_USER"),data || {});
    }

    this.statisticsSendMsg = function (data) {
        return ajaxService.post(ajaxService.getApiUri("STATISTICS_SEND_MSG"),data || {});
    }

}]);